<template>
    <div class="ShrinkMenuGroupPage">
        <div class="group-item" v-for="(item,index) in list" :key="index">
                <shrink-menu-item
                    :title="item.projectName"
                    :is-open="item.isOpen"
                    :start-time="item.predictStartTime"
                    :taskName="taskName"
                    :end-time="item.predictEndTime"
                    :subProjectTask="item.subProjectTaskVoList"
                    :cursorDisable="!(item.list && item.list.length>0)"
                    :status="item.status"
                    :list="list"
                    @change="change"
                >
                    <template v-if="item.list && item.list.length>0">
                        <shrink-menu-group  @change="change" :taskName="taskName" :list="item.list"/>
                    </template>
                </shrink-menu-item>
        </div>
    </div>
</template>

<script>
export default {
    name:'ShrinkMenuGroup'
}
</script>

<script setup>
import ShrinkMenuItem from "@/views/tenderProjectManage/projectManage/components/ShrinkMenuItem.vue";

const props = defineProps({
  list: Array,
  taskName: {
    type: String,
		required: true,
		default: "1",
  }
});


const emits = defineEmits(['change']);
const change = (e) => {
    emits('change',e);
}
</script>

<style lang="scss" scoped>
.ShrinkMenuGroupPage{
    width: 100%;
}
</style>
